<template>
  <div class="vk-warp" id="vk-warp">
      <p class="title">《美好家用户注册协议》</p>
      <pre class="content-inner">{{source}}</pre>
        <x-button class="backbutton" @click.native="back()" type="default">返回并继续注册</x-button>
  </div>
</template>

<script>
import regMhj from "../tools/fileSrc.js";
import { XButton } from "vux";

export default {
  components: {
    XButton
  },
  data() {
    return {
      source: regMhj
    };
  },
  methods: {
    back() {
      this.$router.push({
        name: "register"
      });
    }
  },
  created() {
    document.title = '用户协议';
  },
  mounted() {
    document.getElementById("vk-warp").style.minHeight =
      document.body.clientHeight + "px";
  }
};
</script>
<style lang="less" scoped>
.vk-warp {
  background: #ffffff;
  position: absolute;
  overflow-y: auto;
  top: 0;
  left: 0;
  text-align: left;
  width: 100%;
  height: 100%;
}
.content-inner {
  padding: 15px;
  padding-bottom: 50px;
  white-space: pre-wrap;
  white-space: -moz-pre-wrap;
  white-space: -o-pre-wrap;
  word-wrap: break-word;
}
.title {
  font-weight: bold;
  text-align: center;
  padding-top: 15px;
}
.backbutton {
  border-radius: 0;
  color: white;
  background: #c19d6b;
  position: fixed;
  z-index: 99;
  bottom: 0;
  &:after {
    border: none;
  }
}
</style>
